package com.TeacherInfoServer.common.service;

import com.TeacherInfoServer.pojo.DTO.SearchDTO.TeacherInfoChangeSearchDTO;
import com.TeacherInfoServer.pojo.DTO.TeacherInfoChangeDTO;
import com.TeacherInfoServer.pojo.DTO.UpdateTeacherInfoChangeDTO;
import com.TeacherInfoServer.pojo.entity.TeacherInfoChange;
import com.baomidou.mybatisplus.extension.service.IService;
import jakarta.servlet.http.HttpServletResponse;
import lombok.SneakyThrows;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface TeacherInfoChangeService extends IService<TeacherInfoChange> {
    Map<String, Object> getList(Integer pages, Integer size);


    Map<String,Object> searchTeacherInfoChangeList(TeacherInfoChangeSearchDTO teacherInfoChangeSearchDTO);

    @Transactional
    void addTeacherInfoChange(TeacherInfoChangeDTO teacherInfoChangeDTO);

//    @Transactional
//    void updateTeacherInfoChange(TeacherInfoChange teacherInfoChange);

    @Transactional
    void updateTeacherInfoChange(UpdateTeacherInfoChangeDTO teacherInfoChange);

    @Transactional
    boolean deleteTeacherInfoChange(List<Long> ids);

    @SneakyThrows(IOException.class)
    void exportInfo(HttpServletResponse response);
}
